package com.etl.dataflow.common.exception;

import com.etl.dataflow.common.response.Code;
import lombok.Getter;

@Getter
public class ServiceException extends RuntimeException {
    private final int code;
    private final String msg;

    public ServiceException(Code code) {
        this.code = code.getCode();
        this.msg = code.getMsg();
    }

    public ServiceException(int code, String msg) {
        this.code = code;
        this.msg = msg;
    }
}
